<template>
  <div>
    <my-header title="购物车案例"></my-header>
    <div class="main">
      <my-goods :arr="list"></my-goods>
    </div>
    <my-footer :arr="list"></my-footer>
  </div>
</template>

<script>
import MyFooter from './components/MyFooter.vue'
import MyGoods from './components/MyGoods.vue'
import MyHeader from './components/MyHeader.vue'
export default {
  components: { MyHeader, MyFooter, MyGoods },
  data () {
    return {
      list: []
    }
  },
  async created () {
    const { data } = await this.$axios({
      url: '/api/cart'
    })
    this.list = data.list
  }
}
</script>

<style>
  .main{
    padding-top: 45px;
    padding-bottom: 50px;
  }
</style>
